{include file='common/head'}
<style>
    .imgs{width: 80px;height: 80px}
</style>
<body>
<div class="x-body">
    <!--返回状态图标-->
    <a title="返回" href="{:url('index/Black/index')}">
        <i class="layui-icon layui-icon-face-smile" style="font-size: 25px; color: #1E9FFF;">&#xe60c;返回</i>
    </a>

    <!--账号信息-->
    <form class="layui-form" action="">
        <table class="layui-table" lay-skin="nob">
            {volist name='arr' id='arr'}
            <input type="hidden" name="uid" value="$arr.uid" id="hid">
            <tr>
                <td><span style="color: blue">用户ID：</span>{$arr.uid}</td>
                <td><span style="color: blue">手机号：</span>{$arr.phone}</td>
                <td><span style="color: blue">微信昵称：</span>{$arr.nickname}</td>
            </tr>
            <tr>
                <td><span style="color: blue">信息流：</span>{$arr.s}</td>
                <td><span style="color: blue">关注：</span>{:count(array_filter(explode(',',$arr['guid'])))}</td>
                <td ><span style="color: blue">粉丝：</span>{:count(array_filter(explode(',',$arr['fuid'])))}</td>
            </tr>
            <tr>
                <td><span style="color: blue">认证状态：</span>{if $arr.rflg==4} 认证中 {elseif $arr.rflg==1} 认证成功<br/>{elseif $arr.rflg==2} 修改中 {elseif $arr.rflg==3} 过期{elseif $arr.rflg==0} 未认证 {/if}</td>
                <td><span style="color: blue">用户状态：</span>{if $arr.uflg==1}正常{else/}锁定{/if}</td>
                <td ><span style="color: blue">注册时间：</span>{$arr.createtime}</td>
            </tr>
        </table>

        <!--Tab选项卡-->
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">个人信息</li>
                <li>信息流</li>
                <li>关注与粉丝</li>
            </ul>
            <div class="layui-tab-content">
                <!--个人信息-->
                <div class="layui-tab-item layui-show">
                    <table class="layui-table" lay-skin="nob" style="margin-bottom:50px">
                        <tr>
                            <td>头像:{if $arr.avatars_img==''}&nbsp;&nbsp;&nbsp;<img src="{$arr.head_portrait}" style="width:60px;height:60px; border-radius: 50%; ">{else/}&nbsp;&nbsp;&nbsp;<img src="/upload/portrait/{$arr.avatars_img}" style="width:60px;height:60px; border-radius: 50%; ">{/if}</td>
                            <td></td>
                            {if $arr.uname==''}<td>姓名:{$arr.nickname}</td>{else /}<td>姓名:{$arr.uname}</td>{/if}
                            <td>企业名称:{$arr.company}</td>
                        </tr>
                    </table>
                    <table class="layui-table" style="width: 97px; margin-top:70px" lay-skin="nob">
                        <tr>
                            <td width="40px">厂房外景:</td>
                        </tr>
                    </table>
                    <div style="padding-left: 120px;margin-top: -60px;">
                        <?php foreach($location_img as $i){ ?>
                        <img src="/upload/news/{$i}" class="imgs">
                        <?php }?>
                    </div>
                    <table class="layui-table" style="width: 97px;margin-top:70px" lay-skin="nob">
                        <tr>
                            <td width="40px">办公场所:</td>
                        </tr>
                    </table>
                    <div style="padding-left: 120px;margin-top: -40px;">
                        <?php foreach($place_img as $i){ ?>
                        <img src="/upload/news/{$i}" class="imgs">
                        <?php }?>
                    </div>
                    <table class="layui-table" style="width: 97px;margin-top:55px" lay-skin="nob">
                        <tr>
                            <td width="40px">常规设备:</td>
                        </tr>
                    </table>
                    <div style="padding-left: 120px;margin-top: -40px;">
                        <?php foreach($equipment_img as $i){ ?>
                        <img src="/upload/news/{$i}" class="imgs">
                        <?php }?>
                    </div>
                    <table class="layui-table" style="width: 97px;margin-top:55px; boder-width:0" lay-skin="nob">
                        <tr>
                            <td>营业执照</td>
                        </tr>
                    </table>
                    <div style="padding-left: 120px;margin-top: -40px;">
                        <?php foreach($license_img as $i){ ?>
                        <img src="/upload/news/{$i}" class="imgs">
                        <?php }?>
                    </div>
                    <p></p>
                    <table class="layui-table" lay-skin="nob" style="margin-top:55px">
                        <td>企业能力:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            {if $nengli[0]['ability']==''}{else/}
                            <?php foreach($nengli as $key){ ?>
                            <span class="layui-btn layui-btn-radius layui-btn-warm">{$key['ability']}</span>
                            <?php } ?>
                            {/if}
                        </td>
                    </table>
                    <table class="layui-table" lay-skin="nob" style="margin-top:40px">
                        <tr>
                            <td>主营产品：{$arr.product}</td>
                        </tr>
                        <tr>
                            <td>基本信息：{$arr.information}</td>
                        </tr>
                        <tr>
                            <td>交付能力：{$arr.ability}</td>
                        </tr>
                        <tr>
                            <td>经营地址：{$arr.address}</td>
                        </tr>
                        <tr>
                            <td>公司介绍：{$arr.introduce}</td>
                        </tr>
                    </table>
                    <table class="layui-table" style="width: 97px; margin-top:40px" lay-skin="nob">
                        <thead>
                        <tr>
                            <td>认证信息</td>
                        </tr>
                        </thead>
                    </table>
                    <table class="layui-table" lay-skin="nob">
                        <tr>
                            <td>套餐有效时间：{$arr.phase_time}</td>
                            <td>认证时间：{$arr.s_createtime}</td>
                        </tr>
                        <tr>
                            <td>姓名：{$arr.uname}</td>
                            <td>身份证号：{$arr.card}</td>
                        </tr>
                    </table>
                    <table class="layui-table" lay-skin="nob">
                        <tr>
                            <td><img src="/upload/real/{$arr.front_img}" style="width: 200px;height: 90px"></td>
                            <td> <img src="/upload/real/{$arr.reverse_img}" style="width: 200px;height: 90px"></td>
                        </tr>
                        <tr>
                            <td></td>
                        </tr>
                        <tr>
                            <td>身份证正面照</td>
                            <td>身份证反面照</td>
                        </tr>
                        <tr>
                            <td class="td-manage">
                                <a class="layui-btn layui-btn-radius layui-btn-danger" title="修改" href="javascript:;" onclick="x_admin_show('编辑','xiugai?uid={$arr.uid}',600,400)">
                                    <span style="color: mediumblue">修改</span>
                                    <p style="color: #868686">(只能帮用户完善信息)</p>
                                </a>
                            </td>
                            <td><input type="checkbox" <?php if ($arr['uflg'] ==1): ?>  checked="" <?php endif; ?> name="status[]" lay-skin="switch" lay-filter="switchSuodoing" lay-text="锁定|解锁"/ value="{$arr.uid}"></td>
                        </tr>
                        {/volist}
                    </table>
                </div>

                <!--信息流表-->
                <div class="layui-tab-item">
                    <table class="layui-table" lay-skin="nob">
                        <thead>
                        <tr>
                            <th>NO</th>
                            <th>信息ID</th>
                            <th>类型</th>
                            <th>图片</th>
                            <th>标题</th>
                            <th>供应数量</th>
                            <th>单位</th>
                            <th>价格</th>
                            <th>摘要</th>
                            <th>用户</th>
                            <th>发布时间</th>
                            <th>信息状态</th>
                        </thead>
                        <tbody>
                        {volist name='xinxi' id='xinxi'}
                        <tr>
                            <td>{$key++}</td>
                            <td>{$xinxi.mid}</td>
                            <td>{if $xinxi.type==1}产品{else/}文章{/if}</td>
                            {if $xinxi['picture']!=''}<td><?php $str=$xinxi['picture'];
                                $a=explode(",",$str);?><img src="/upload/message/{$a[0]}" width="40"></td>
                            {else/}<td><img src="/upload/message/no.jpg" width="40"></td>{/if}
                            <td>{$xinxi.title}</td>
                            <td>{$xinxi.number}</td>
                            <td>{$xinxi.unit}</td>
                            <td>{$xinxi.price}</td>
                            <td class="td-status">{$xinxi.content|mb_substr=0,20}</td>
                            {if $xinxi.uname==''}<td class="td-status">{$xinxi.nickname}</td>{else /}<td class="td-status">{$xinxi.uname}</td>{/if}
                            <td class="td-status">{$xinxi.createtime}</td>
                            <td class="td-status">{if $xinxi.mflg==1}正常{else/}锁定{/if}</td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>

                <!--关注与粉丝表-->
                <div class="layui-tab-item">
                    <table class="layui-table" style="margin-bottom: 50px" lay-skin="nob">
                        <thead>
                        <h3>关注列表</h3>
                        <tr>
                            <th>NO</th>
                            <th>用户ID</th>
                            <th>头像</th>
                            <th>姓名</th>
                            <th>关注时间</th>
                        </thead>
                        <tbody>
                        {volist name='g6' id='g6' key='key'}
                        {if $g6==''}
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        {else /}
                        <tr>
                            <td>{$key++}</td>
                            <td>{$g6['uid']}</td>
                            {if $g6['avatars_img']==''}<td><img src="{$g6['head_portrait']}" width="40"></td>{else /}<td><img src="/upload/portrait/{$g6['avatars_img']}" width="40">
                        </td>{/if}
                            {if $g6['uname']==''}<td>{$g6['nickname']}</td>{else /}<td>{$g6['uname']}</td>{/if}
                            <td>{$g6['createtime']}</td>
                        </tr>
                        {/if}
                        {/volist}
                        </tbody>
                    </table>
                    <table class="layui-table" lay-skin="nob">
                        <thead>
                        <h3>粉丝列表</h3>
                        <tr>
                            <th>NO</th>
                            <th>用户ID</th>
                            <th>头像</th>
                            <th>姓名</th>
                            <th>关注时间</th>
                        </thead>
                        <tbody>
                        {volist name='f6' id='f6' key='key'}
                        {if $f6==''}
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        {else /}
                        <tr>
                            <td>{$key++}</td>
                            <td>{$f6['uid']}</td>
                            {if $f6['avatars_img']==''}<td></td>{else /}<td><img src="/upload/portrait/{$f6['avatars_img']}" width="40">
                        </td>{/if}
                            {if $f6['uname']==''}<td>{$f6['nickname']}</td>{else /}<td>{$f6['uname']}</td>{/if}
                            <td>{$f6['createtime']}</td>
                        </tr>
                        {/if}
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['laydate','form'], function() {
        var laydate = layui.laydate;
        var form = layui.form;
        //执行一个laydate实例
        form.on('switch(switchSuodoing)', function (data) {
            var id = data.value;
            //alert(111);
            $.ajax({
                url: "{:url('index/Black/suoding')}",
                type: "post",
                dataType: "JSON",
                data: {uid: id},
                success: function (res) {
                    if (res == 1) {
                        layer.msg('操作成功！');
                        location.href="{:url('index/black/index')}";跳转窗口到父页面的子页面
                        //layer.close(index);
                        //class="imgs"
                        return false;
                    } else {
                        layer.msg('操作失败！');
                        return false;
                    }
                }
            });
        });
    });
</script>
</body>
</html>





